import request from '@/utils/request'

// 查询培训列表
export function listEducate(query) {
  return request({
    url: '/system/educate/list',
    method: 'get',
    params: query
  })
}

// 查询培训详细
export function getEducate(id) {
  return request({
    url: '/system/educate/' + id,
    method: 'get'
  })
}

// 新增培训
export function addEducate(data) {
  return request({
    url: '/system/educate',
    method: 'post',
    data: data
  })
}

// 修改培训
export function updateEducate(data) {
  return request({
    url: '/system/educate',
    method: 'put',
    data: data
  })
}

// 删除培训
export function delEducate(id) {
  return request({
    url: '/system/educate/' + id,
    method: 'delete'
  })
}

// 培训详情
export function myGetEducate(id) {
  return request({
    url: '/system/educate/getTrainingPlanById/' + id,
    method: 'post'
  })
}
